package top.dark.design.patterns.adapter.classadapter;

/**
 * Author: Darkn
 * description:
 * Create Time: 2021/4/25 19:47
 */
public class VoltageAdapter extends Voltage220V implements IVoltage5V {
    @Override
    public Integer output5V() {
        System.out.println(" 类适配器模式，进行交流电转换适配~");
        Integer voltage = this.output220V();
        Integer outputV = voltage / 44;
        System.out.println(" 适配完成，适配后的电压：" + outputV);
        return outputV;
    }
}
